<include file="Public:header" />
<script type="text/javascript">
function ajaxCheckUser(){
	$.ajax({
		url: "__URL__/checkLogin",
		type: 'POST',
		dataType: 'json',
		data: {username:$("#username").val(),password:$("#password").val()},
		cache: false,
		beforeSend: function(){
		},
		success: function(json){
			if(json.status=='200'){
				$(".box-info").html(json.message);
				location.href= "__APP__/Index/index";
			}
			else if(json.status=='300'){
				$(".box-info").html(json.message);
			}
		},
		error:function(XMLHttpRequest, textStatus, errorThrown){
			$(".box-info").html("网络错误！");
		},
		complete:function(){
		}
	});
}
</script>
</head>
<body>
	<!-- Header -->
	<header id="top">
		<div class="wrapper-login">
			<!-- Title/Logo - can use text instead of image -->
			<div id="title"><img SRC="__PUBLIC__/Theme/Admin/Img/logo.png" alt="Administry" /><!--<span>Administry</span> demo--></div>
			<!-- Main navigation -->
			<nav id="menu">
				<ul class="sf-menu">
					<li class="current"><a href="#">Login</a></li>
					<li><a href="#">Register</a></li>
				</ul>
			</nav>
			<!-- End of Main navigation -->
		</div>
	</header>
	<!-- End of Header -->
	<!-- Page title -->
	<div id="pagetitle">
		<div class="wrapper-login"></div>
	</div>
	<!-- End of Page title -->
	
	<!-- Page content -->
	<div id="page">
		<!-- Wrapper -->
		<div class="wrapper-login">
				<!-- Login form -->
				<section class="full">					
					
					<h3>Login www.xxx.cn</h3>
					
					<div class="box box-info">账号：admin，密码：admin</div>

					<form id="loginform" method="post" action="#" onsubmit="ajaxCheckUser();return false;">

						<p>
							<label class="required" for="username">Username:</label><br/>
							<input type="text" id="username" class="full" value="" name="username"/>
						</p>
						
						<p>
							<label class="required" for="password">Password:</label><br/>
							<input type="password" id="password" class="full" value="" name="password"/>
						</p>
						
						<p>
							<input type="checkbox" id="remember" class="" value="1" name="remember"/>
							<label class="choice" for="remember">Remember me?</label>
						</p>
						
						<p>
							<input type="submit" class="btn btn-green big" value="Login"/> &nbsp; <a href="javascript: //;" onClick="$('#emailform').slideDown(); return false;">Forgot password?</a> or <a href="#">Need help?</a>
						</p>
						<div class="clear">&nbsp;</div>

					</form>
					
					<form id="emailform" style="display:none" method="post" action="#" onsubmit="ajaxCheckEmail();return false;">
						<div class="box">
							<p id="emailinput">
								<label for="email">Email:</label><br/>
								<input type="text" id="email" class="full" value="" name="email"/>
							</p>
							<p>
								<input type="submit" class="btn" value="Send"/>
							</p>
						</div>
					</form>
					
				</section>
				<!-- End of login form -->
				
		</div>
		<!-- End of Wrapper -->
	</div>
	<!-- End of Page content -->
	
<include file="Public:footer" />